package two_xia.ex9.Demo09;

public class StrategyPattern {
    public static void main(String[] args) {
        EncryptionContext context = new EncryptionContext(new CaesarEncryption());
        System.out.println("凯撒加密：" + context.encryptData("重要数据"));

        context.setStrategy(new DESEncryption());
        System.out.println("DES加密：" + context.encryptData("重要数据"));
    }
}